package com.cn.sptest.process;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cn.sptest.listener.MyBean;

@Component
public class MyTestBean implements InitializingBean{
	
	private MyBean name;
	
	public MyTestBean(){
		System.out.println("实例化my test bean");
	}
	
	

	public MyBean getName() {
		return name;
	}


	@Autowired
	public void setName(MyBean name) {
		System.out.println("bean 属性装配");
		this.name = name;
	}



	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("bean  afterPropertiesSet");
	}
	
	
}
